Skip to content

perl::perl: Allow to work with musl libc - #340

Merged
jkloetzke merged 4 commits into
BobBuildTool:masterfrom
admlck:perl-musl
Nov 5, 2026
Merged

jkloetzke merged 4 commits into
BobBuildTool:masterfrom
admlck:perl-musl

Conversation

@admlck

@admlck admlck commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@jkloetzke

Copy link
Copy Markdown
Member

Could you check perl-cross again? There seem to be fixes available.

There's a pull request for the _GNU_SOURCE problem: arsv/perl-cross#180

The locale problem has a recent commit. I would rather piggyback on that mechanism and add L4Re as additional musl case.

@jkloetzke jkloetzke mentioned this pull request Oct 29, 2026
@admlck
admlck force-pushed the perl-musl branch 2 times, most recently from 034706c to 4ea5939 Compare October 31, 2026 17:52
@admlck

admlck commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @jkloetzke, very good hints.

Please advice on the long line the lint checker sees. It's the URL of perl-cross I believe.

Comment thread recipes/perl/perl.yaml Resolved
perl-cross symlinks the sources into the build directory only if there
is no MANIFEST there yet. If a previous run was interrupted while
symlinking, later runs skip the symlinking and fail, e.g. when patching
files in cpan/. Mark a completed configure and start with a fresh build
directory if the marker is missing.

Signed-off-by: Adam Lackorzynski <adam@l4re.org>
This fixes, among others, locale issues with musl.
Drop configure_sigs.sh patch that is no longer required.

Signed-off-by: Adam Lackorzynski <adam@l4re.org>
This is arsv/perl-cross#180 that fixes
a _GNU_SOURCE issue.

Signed-off-by: Adam Lackorzynski <adam@l4re.org>
perl-cross hardcodes glibc's setlocale(LC_ALL, NULL) format, which
returns name=value pairs for mixed locales. musl returns the category
names positionally instead, separated by ';' ("C.UTF-8;C;C;C;C;C").
Perl's native Configure detects this by running a probe, but that's
not possible when cross compiling.

As musl starts with LC_CTYPE=C.UTF-8 and all other categories at C,
the resulting perl panics on startup:

    locale.c: 1484: panic: 'C.UTF-8;C;C;C;C;C' needs an '=' to split name=value
    ; errno=0
    Called by locale.c: 4101

Add a patch to perl-cross's configure that checks at compile time for
a libc that is neither glibc nor uclibc and has musl's locale category
layout, and selects the positional format for it. Other targets keep
the name=value format.

Signed-off-by: Adam Lackorzynski <adam@l4re.org>
@jkloetzke
jkloetzke merged commit a353491 into BobBuildTool:master Nov 5, 2026
3 checks passed
@jkloetzke

Copy link
Copy Markdown
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants